I'm getting a Local variable referenced before assignment even after declaring the variable on top o